﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;

namespace QRCode_MS.ViewModels
{
    /// <summary>
    /// 创建命令对象类
    /// </summary>
    public class SimpleCommand : ICommand
    {
        public event EventHandler CanExecuteChanged;
        public Action<object> DoExecute { get; set; }

        public bool CanExecute(object parameter)
        {
            return true;
        }

        public void Execute(object parameter)
        {
            if (DoExecute != null)
            {
                DoExecute(parameter);
            }
        }
    }
}
